|
|
5.2 | Managing the Cisco File System | ||
| 5.2.7 | Environment variables |
|
The IOS can also be restored from a TFTP
session. Downloading the image using TFTP from ROMmon is the fastest
way to restore an IOS image to the router. This is done by setting
environmental variables and then using the
tftpdnld
command. Since the ROMmon has very limited
functions, no configuration file is loaded during boot. The router
therefore has no IP or interface configuration. The environmental
variables provide a minimal configuration to allow for the TFTP of the
IOS. The ROMmon TFTP transfer works only on the first LAN port so a
simple set of IP parameters are set for this interface. To set a
ROMmon environment variable, the variable name is typed, then the
equal sign (=), and the value for the variable (VARIABLE_NAME=value).
For example, to set the IP address to 10.0.0.1, type IP_ADDRESS=10.0.0.1
at the ROMmon prompt.
The minimum variables required to use tftpdnld are:
To check the ROMmon environment
variables, the set
command can be used.
Once the variables are set for the IOS
download, the tftpdnld
command is entered with no arguments. The ROMmon will echo the
variables and then a confirmation prompt will appear with a warning
that this will erase the flash.
As each datagram of the IOS file is received, a “!” will be displayed. When the complete IOS file has been received, the flash will be erased and the new IOS image file written. Appropriate messages will be displayed as the process is completed. When the new image is written into flash and the ROMmon prompt is displayed, the router can be restarted by typing i. The router should now boot from the new IOS image in flash.
|